"use client"

import { useFavorites } from "../utils/hooks/useFavorites"
import { useInfoModal } from "../utils/hooks/useInfoModal"
import { useMovieList } from "../utils/hooks/useMovies"
import { BillBoard } from "./_components/BillBoard"
import InfoModal from "./_components/InfoModal"
import { MovieList } from "./_components/MovieList"
import { Navbar } from "./_components/NavBar"

export default function HomePage() {
    const { data: movies } = useMovieList()
    const { data: favorites } = useFavorites()
    // const { isOpen, closeModal } = useInfoModal()
    return (
        <>
            <InfoModal />
            <Navbar />
            <BillBoard />
            <div className="pb-40">
                <MovieList title="Trending now" data={movies} />
                <MovieList title="My favorites" data={favorites} />
            </div>
        </>
    )
}